package br.poli.ecomp.tcc.stimultimidia
{
	import br.poli.ecomp.tcc.stimultimidia.control.command.*;
	//import br.poli.ecomp.tcc.stimultimidia.view.components.MainView;
	
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;
	import org.puremvc.as3.patterns.observer.Notification;	

	public class ApplicationFacade extends Facade implements IFacade
	{

		public static const APP_STARTUP:String = "AppStartUp";	
		public static const LOGIN:String = "LOGIN";	
		
		
		
		
		public static function getInstance() : ApplicationFacade {

			if ( instance == null ) instance = new ApplicationFacade( );

			return instance as ApplicationFacade;

		}		
		
		override protected function initializeController():void
		{
			super.initializeController();

			registerCommand(APP_STARTUP, StartUpCommand ); 
			registerCommand(LOGIN, LoginCommand ); 
			//registerCommand(LOGIN_SUCESS, LoginCommand ); 
			
			// Uncomment and replace with the appropriate Commands
			//registerCommand(CREATE_USUARIOVO, CreateUsuarioVOCommand);
			//registerCommand(GET_USUARIOVOS, GetUsuarioVOsCommand);
			//registerCommand(UPDATE_USUARIOVO, UpdateUsuarioVOCommand);
			//registerCommand(DELETE_USUARIOVO, DeleteUsuarioVOCommand);
			// Uncomment and replace with the appropriate Commands
			//registerCommand(CREATE_TELAVO, CreateTelaVOCommand);
			//registerCommand(GET_TELAVOS, GetTelaVOsCommand);
			//registerCommand(UPDATE_TELAVO, UpdateTelaVOCommand);
			//registerCommand(DELETE_TELAVO, DeleteTelaVOCommand);
			
			
		}

		public function startup( app:STIAS3 ):void
		{			
			sendNotification( ApplicationFacade.APP_STARTUP, app ) ;
		}
		
	}
}